
load('sandiantu.mat');
X=zeros(1,150);
Y=zeros(1,150);
Z=zeros(1,150);
value=zeros(1,150);
temt = 1;

for q = 1:10
    for w = 1:5
        for rw = 1:5
X(temt) = q;
Y(temt) = w;
Z(temt) = all_rate(q,w,rw);

temt = temt+1;
        end
    end
end
​
scatter3(X,Y,Z,40,value,'filled')    % draw the scatter plot
ax = gca;
ax.XDir = 'reverse';
view(-31,14)
xlabel('W. Longitude')
ylabel('N. Latitude')
zlabel('% Rural Population')​
cb = colorbar;                                     % create and label the colorbar
cb.Label.String = 'Fatalities per 100M vehicle-miles';

